﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="HouseMaintain.aspx.vb" Inherits="WebForm_Mail_SendMail" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:ObjectDataSource ID="dbHouseType" runat="server" 
                SelectMethod="GetHouseType" TypeName="AssetManage.BBL.HouseTypeBBL" 
                DeleteMethod="DeleteHouseType">
                <DeleteParameters>
                    <asp:Parameter Name="House_ID" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </DeleteParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtHouse_ID" Name="House_ID"  ConvertEmptyStringToNull ="false" DefaultValue=""
                                            PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="txtName" Name="Name" PropertyName="Text" ConvertEmptyStringToNull ="false" DefaultValue=""
                        Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" 
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dbOAStoreHouse" runat="server" 
                SelectMethod="GetOAStoreHouse" TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="0" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" 
                        PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <table border="1" width="900px">
                <tr>
                    <td style="text-align: center" colspan="6">
                        <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Font-Bold="True"
                            Font-Size="24px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="Label2" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtHouse_ID" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                       <asp:Label ID="Label3" runat="server" meta:resourcekey="lblName"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                   
                    
                    <td  colspan="6">
                        <asp:Panel ID="plInsert" runat="server" BackColor="#E7FEC2" Height="100px" 
                            Width="600px">
                            <table border="1" width="600px">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="Label1" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                                        </td>
                                    <td>
                                        <asp:DropDownList ID="ddlStoreHouse" runat="server" 
                                            DataSourceID="dbOAStoreHouse" DataTextField="name" DataValueField="id" 
                                            Width="120px">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="text-align: right">
                                        <asp:Label ID="Label4" runat="server" meta:resourcekey="lblHouseType"></asp:Label></td>
                                    <td>
                                        <asp:DropDownList ID="ddlHouseType" runat="server">
                                            <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                            <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" colspan="8">
                                        <asp:Button ID="btnSave" runat="server" meta:resourcekey="btnSave" />
                                        <asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </asp:Panel>
                        <asp:Button ID="btnDummy" runat="server" Style="display: none" SkinID="null" />
                  <ajaxToolkit:ModalPopupExtender ID="mpIns" runat="server" TargetControlID="btnInsert" X="20" Y="60"
                  PopupControlID="plInsert" CancelControlID="btnCancel" PopupDragHandleControlID="plInsert" />
                    </td>
                    
                </tr>
                <tr style="vertical-align: text-top">
                    <td colspan="6" style="text-align: center">
                        <asp:Button ID="btnInsert" runat="server" meta:resourcekey="btnInsert" />
                        <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" />
                    </td>
                </tr>
                <tr style="vertical-align: text-top" >
                    <td colspan="6">
                        <TServerControl:TGridView ID="gvHouseType" runat="server" AllowHoverEffect="False"
                            AllowHoverSelect="False" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dbHouseType"
                            ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0"
                            Width="900px" DataKeyNames="House_ID">
                            <Columns>
                                <asp:TemplateField>
                                    <EditItemTemplate>
                                        
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        
                                        <asp:Button ID="btnDelette" runat="server" CommandName="Delete" meta:resourcekey="btnDelete"
                                            CommandArgument='<%# Bind("House_ID") %>'></asp:Button>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField  DataField="House_ID" meta:resourcekey="colHouseID" />
                                <asp:BoundField  DataField="Name"  meta:resourcekey="colName" />
                                <asp:BoundField DataField="Desc"   meta:resourcekey="colDesc"  />
                                <asp:TemplateField   meta:resourcekey="colHouseType" >
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlType" runat="server" 
                                            SelectedValue='<%# Bind("House_Type") %>'>
                                            <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                            <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlType" runat="server" Enabled="False" 
                                            SelectedValue='<%# Bind("House_Type") %>'>
                                            <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                            <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="CrtDate" DataFormatString ="{0:yyyy/MM/dd HH:mm:ss }" meta:resourcekey="colCrtName"  />
                                <asp:BoundField DataField="CrtName" meta:resourcekey="colCrtDate" />
                               
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                            </EmptyDataTemplate>
                        </TServerControl:TGridView>
                       
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
